/*

package cloud.xlh.my_system.shiro.config;

import cloud.xlh.my_system.shiro.realm.MyRealm;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.apache.shiro.mgt.SecurityManager;

import java.util.HashMap;
import java.util.Map;


*/
/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/6/26 17:08
 * @ Description:
 *//*


@Configuration
public class ShiroConfig {

    @Autowired
    private MyRealm myRealm;


    */
/**
     * shiroFilter配置
     *
     * @param securityManager
     * @return
     *//*

    @Bean
    public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) {
        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
        shiroFilterFactoryBean.setSecurityManager(securityManager);

        Map<String, String> filterChainDefinitionMap = new HashMap<String, String>();
        // 设置登录页面
        shiroFilterFactoryBean.setLoginUrl("/login");
        // 设置登录成功跳转页面
        shiroFilterFactoryBean.setSuccessUrl("/home");

        //        filterChainDefinitionMap.put("/*", "anon");
        filterChainDefinitionMap.put("/mayikt", "anon");
        filterChainDefinitionMap.put("/home", "authc");
        //        filterChainDefinitionMap.put("/order/*", "roles[admin]");
//        filterChainDefinitionMap.put("/order/insertOrder", "roles[insert]");
//        filterChainDefinitionMap.put("/order/updateOrder", "roles[update]");
//        filterChainDefinitionMap.put("/order/deleteOrder", "roles[delete]");


        //未授权界面;
//        shiroFilterFactoryBean.setUnauthorizedUrl("/403");
        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
        return shiroFilterFactoryBean;
    }

    */
/**
     * 注入安全管理器
     *
     * @return SecurityManager
     *//*

    @Bean
    public SecurityManager securityManager() {
        // 将自定义 Realm 加进来
        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
        securityManager.setRealm(myRealm);
        return securityManager;
    }

}


*/
